<?php /* УТФ-8:fix */

class SPImodel__singlepage__front extends SPImodel__singlepage
{
    public function get_by_tid( $tid )
    {
        $lang = SPI::I('lang')->get_lang();
		
		$query =    " SELECT 
							name_{$lang} as name,
							description_{$lang} as description,
							meta_title_{$lang} as meta_title,
							meta_keywords_{$lang} as meta_keywords,
							meta_description_{$lang} as meta_description "
               .      " FROM ".SPIcfg::$store['table:singlepages']
               .     " WHERE tid = '" . addslashes( $tid ) ."' "
               ;

        $res = SPIstore::I()->query( $query )->fetch_and_close();
		
		return $res;
    }
}
